#include "Callbacks.h" 


gboolean callback_expose_event (GtkWidget *widget, GdkEventExpose *event,gpointer p){
	GraficaEditor * gs = (GraficaEditor*) p;
     return gs->expose_event (widget,event);
}

gboolean callback_configure_event(GtkWidget *widget, GdkEventConfigure *event,gpointer p){
	
	GraficaEditor * gs = (GraficaEditor*) p;
    return gs->configure_event (widget,event);
}

gboolean callback_button_press_event (GtkWidget *widget, GdkEventButton *event,gpointer p){
	
	GraficaEditor * gs = (GraficaEditor*) p;
    return gs->button_press_event(widget,event);
}

gboolean callback_motion_notify_event (GtkWidget *widget, GdkEventMotion *event,gpointer p){
	
	 GraficaEditor * gs = (GraficaEditor*) p;
     return gs->motion_notify_event(widget,event);
}

 gint callback_delete_event (GtkWidget *widget, GdkEvent  *event,gpointer p){
	 
	 GraficaEditor * gs = (GraficaEditor*) p;
	 gs->cerrarVentana(widget);
     return TRUE;
 }

void callback_cerrarVentana (GtkWidget *widget,gpointer p){
	
			GraficaEditor * gs = (GraficaEditor*) p;
	        gs->cerrarVentana(widget);
	        
}

 void apretarBotonSi(GtkWidget *widget, gpointer p){
	 
	 GraficaEditor * gs = (GraficaEditor*) p;
            return gs->abrirArchivo();
}


void apretarBotonMaiz (GtkWidget *widget, gpointer p){
	    
	   GraficaEditor * gs = (GraficaEditor*) p;
	   gs->cambiarAmaiz();
}
void apretarBotonSoja (GtkWidget *widget, gpointer p){
	    
	    GraficaEditor * gs = (GraficaEditor*) p;
	    gs->cambiarAsoja();
}
 void apretarBotonGirasol (GtkWidget *widget, gpointer p){

    	GraficaEditor * gs = (GraficaEditor*) p;
        gs->cambiarAGirasol();
}
void apretarBotonSinPlantar (GtkWidget *widget, gpointer p){
	
	   GraficaEditor * gs = (GraficaEditor*) p;
       gs->cambiarASinPlantar();
}
void apretarBotonInexistente (GtkWidget *widget, gpointer p){
	
	   GraficaEditor * gs = (GraficaEditor*) p;
       gs->cambiarAInexistente();
}
void apretarBotonAbrir (GtkWidget *widget, gpointer p){

	   GraficaEditor * gs = (GraficaEditor*) p;
       gs->abrirArchivo();
}

  void file_ok_boton_Abrir(GtkWidget *widget, gpointer p){
	  
         GraficaEditor * gs = (GraficaEditor*) p;
         gs->abrir();
}
 void apretarBotonGuardar (GtkWidget *widget, gpointer p){
         GraficaEditor * gs = (GraficaEditor*) p;
         gs->guardarArchivo();
}	 
void file_ok_boton_Guardar(GtkWidget *widget, gpointer p){
	
         GraficaEditor * gs = (GraficaEditor*) p;
         gs->guardar();
}
